package com.bw.mvpcore.glideload

import android.content.Context
import android.graphics.drawable.Drawable
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bw.mvpcore.R

class GlidImg {
/*    companion object{
        val glidImg:GlidImg by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
            GlidImg()
        }
    }*/
    companion object {
        val glidImg:GlidImg by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
            GlidImg()
        }
    }
    fun getimg(context: Context,imageView: ImageView,url:String){
        Glide.with(context).load(url).skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(imageView)
    }
    fun getDrawableimg(context: Context,imageView: ImageView,url: Int){
        Glide.with(context).load(url).skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(imageView)
    }
}